I was making a self-role menu using select menus feature and an error occurred while I was trying to run the command, the part of the command code:
const Row5 = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId('pings')
.setPlaceholder('Click to select the self-roles')
.addOptions([
{
label: `Giveaways`,
value: `giveaway`,
emoji: '🎉'
},
{
label: `Tweets`,
value: `twitterrrr`,
emoji: '938517355879870474'
},
{
label: `YouTube Uploads`,
value: `uploads`,
emoji: '879396250213027880'
},
{
label: `Events`,
value: `events`,
emoji: '🎪'
},
{
label: `Chat Revive`,
value: `revive`,
emoji: '🌑'
},
{
label: `Hold`,
description: `Used to select the same option again`,
value: `hold`,
emoji: '🖐️'
}
])
)
Here is the full error:
DiscordAPIError: Invalid Form Body
components[0].components[0].options[1]: The specified option value is already used
components[0].components[0].options[2]: The specified option value is already used
[object Promise]
The error says that some option's values are not unique, but it is clearly not true, according to the code.
The interesting thing is - after I remove this part of code:
{
label: `Tweets`,
value: `twitterrrr`,
emoji: '938517355879870474'
},
{
label: `YouTube Uploads`,
value: `uploads`,
emoji: '879396250213027880'
},
everything starts working fine. Hm.